﻿using FluentValidation.Attributes;
using Logistics.Web.Models.Common;
using Logistics.Web.Validators;
using Nop.Web.Framework;
using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace Logistics.Web.Models.Order
{
    public class LocationAddressModel
    {
        public LocationAddressModel()
        {
            Addresses = new List<SelectListItem>();
            AvailableStateProvinces = new List<SelectListItem>();
            AvailableCountries = new List<SelectListItem>();
        }

        public int? SelectedAddressId { get; set; }
        public bool IsAddressTypeVerified { get; set; }
        public AddressModel Address { get; set; }
        public List<SelectListItem> Addresses { get; set; }
        public bool? NoSignature { get; set; }
        public List<SelectListItem> AvailableStateProvinces { get; set; }
        public List<SelectListItem> AvailableCountries { get; set; }

        public string OrderByInfo { get; set; }
        public string AdditionalInstruction { get; set; }
        public bool HasInsurance { get; set; }
        public decimal InsuranceValue { get; set; }

        public bool HasPickupDate { get; set; }
        public int? PickupTimeWindowId { get; set; }
        public List<string> AvaliablePickupDates { get; set; }
        public List<string> AvaliablePickupTimeWindows { get; set; }
        public PickupDateTimeWindow[,] AvaliablePickupDateTimeWindows { get; set; }
        public DateTime? PickupDate { get; set; }
        public class PickupDateTimeWindow
        {
            public DateTime PickupDate { get; set; }
            public int PickupTimeWindow { get; set; }
            public bool CanSelect { get; set; }
            public bool Selected { get; set; }
        }
    }
}